package com.zzyl.nursing.member.controller;

import com.zzyl.common.core.controller.BaseController;
import com.zzyl.common.core.domain.AjaxResult;
import com.zzyl.common.core.page.TableDataInfo;
import com.zzyl.nursing.member.pojo.Reservation;
import com.zzyl.nursing.service.INursingPlanService;
import com.zzyl.nursing.service.ReservationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 预约接口类
 */
@RestController
@RequestMapping("/member/reservation")
public class ReservationController extends BaseController {

    @Autowired
    private ReservationService reservationService;


    //分页查询展示预约列表
//    @GetMapping("/page")
//    public TableDataInfo list(Reservation reservation) {
//        startPage();
//        List<Reservation> list = reservationService.selectReservationList(reservation);
//        return getDataTable(list);
//    }

    //新增参观预约
    @PostMapping
    public AjaxResult addReservation(@RequestBody  Reservation reservation) {
        reservationService.save(reservation);
        return AjaxResult.success();
    }
}
